package com.luhuiguo.cms.server.service;

import java.util.List;

import com.luhuiguo.cms.server.entity.Article;
import com.luhuiguo.cms.server.service.restriction.ArticleFilter;

public interface ArticleService {

    Article getArticle(Long id);

    void saveArticle(Article article);

    Article updateArticle(Article article);

    void deleteArticle(Long id);


    List<Article> findArticles(ArticleFilter filter, int... rowStartIdxAndCount);

    int getArticleCount(ArticleFilter filter);

    List<Article> findArticles();

    List<Article> findArticlesByStatus(int status, int... rowStartIdxAndCount);

    int getArticleCountByStatus(int status);

    List<Article> findArticlesByChannelId(Long channelId, int... rowStartIdxAndCount);

    int getArticleCountByChannelId(Long channelId);

    void deleteArticleByChannelId(Long channelId);

    List<Article> findApprovedArticlesByChannelId(Long channelId, int... rowStartIdxAndCount);

    int getApprovedArticleCountByChannelId(Long channelId);

}
